package com.sailfish.springbootdemo.dao.db1;

import com.sailfish.springbootdemo.common.DB1TableName;
import com.sailfish.springbootdemo.pojo.db1.BisBig;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.type.JdbcType;

import java.util.List;

public interface BisBigDao {
    /**
     * 查询
     *
     * @return
     */
    @Results(id = "bisBigResultMap", value = {
            @Result(column = "bis_big_id", property = "bisBigId", jdbcType = JdbcType.INTEGER),
            @Result(column = "bis_big_name", property = "bisBigName", jdbcType = JdbcType.VARCHAR),
            @Result(column = "create_time", property = "createTime", jdbcType = JdbcType.DATETIMEOFFSET),
            @Result(column = "update_time", property = "updateTime", jdbcType = JdbcType.DATETIMEOFFSET),
            @Result(column = "sort", property = "sort", jdbcType = JdbcType.INTEGER),
    })
    @Select("select * from " + DB1TableName.BIS_BIG + " order by sort ")
    List<BisBig> getAllBisBig();
}
